package com.qufadai.btce.util;
import java.util.List;
import java.util.Map;

import com.qufadai.btce.api.BtceClientApi;
import com.qufadai.btce.api.BtceClientTradeApi;
import com.qufadai.btce.enums.Pair;
import com.qufadai.btce.enums.TransactionType;
import com.qufadai.btce.exception.BtceFunctionalException;
import com.qufadai.btce.exception.BtceTechnicalException;
import com.qufadai.btce.model.AccountInfo;
import com.qufadai.btce.model.Depth;
import com.qufadai.btce.model.Order;
import com.qufadai.btce.model.PairInfo;
import com.qufadai.btce.model.Ticker;
import com.qufadai.btce.model.Trade;
import com.qufadai.btce.model.Transaction;


public class Start {

	public static void main(String[] args) throws BtceTechnicalException, BtceFunctionalException {
		BtceClientTradeApi btceClientTradeApi = new BtceClientTradeApi(Constant.BTCE_KEY, Constant.BTCE_SECRET);

		// Retrieve the account info
		AccountInfo accountInfo = btceClientTradeApi.getAccountInfo();
		System.out.println(accountInfo);
		// Make a trade
//		Transaction transaction = btceClientTradeApi.trade(Pair.ltc_eur, TransactionType.buy, 10.1, 0.1);

		// Cancel an order
//		Transaction canceledTransaction = btceClientTradeApi.cancelOrder(orderId,Pair.ltc_eur);

		// Get all active orders
//		Map<String,Order> orders = btceClientTradeApi.getActiveOrders();

		// Cancel all the active orders
//		List<Transaction> transactions = btceClientTradeApi.cancelAllOrders();

		// Instanciate a new client 
		BtceClientApi btceClientApi = new BtceClientApi();

		// Get the ticker for the pair
//		Ticker ticker = btceClientApi.getTicker(Pair.btc_eur);

		// Get the trades for the pair
//		List<Trade> trades = btceClientApi.getTrades(Pair.btc_eur);

		// Get the depth for the pair
//		Depth depth = btceClientApi.getDepth(Pair.btc_eur);

		// Get the pair information
//		Map<String,PairInfo>  pairInfo = btceClientApi.getInfo();
	}
}
